/**
 * @description: 请求结果集
 */
export enum ResultEnum {
  SUCCESS = 2000,
  ERROR = 4000,
  /**当前用户没有登录或者登录已失效，请重新登录 */
  UNAUTHORIZED = 4001,

  ACCOUNTNOTEXIST = 6011, // 用户不存在
  FREQUENTREQUEST = 4029, // 请求频繁
  LOGINERRORONCE = 6012,
  WRONGPASSWORD = 6006
  // ACCOUNTDISABLED = getCode(703),
}

// export const accountErrorMap = [getCode(601), getCode(603)]

// export const passwordErrorMap = [
//   getCode(604),
//   getCode(605),
//   getCode(608),
//   getCode(609)
// ]

export enum HTTP_SUCCESS_CODE {
  CREATE = 201,
  SUCCESS = 200,
  NO_CONTENT = 204
}

export const httpSuccessList = [
  HTTP_SUCCESS_CODE.CREATE,
  HTTP_SUCCESS_CODE.SUCCESS,
  HTTP_SUCCESS_CODE.NO_CONTENT
]
/**
 * @description: 请求方式
 */
export enum RequestEnum {
  GET = 'GET',
  POST = 'POST',
  PUT = 'PUT',
  DELETE = 'DELETE'
}

/**
 * @description:  headers contentType
 */
export enum ContentTypeEnum {
  // json
  JSON = 'application/json;charset=UTF-8',
  // form-data qs
  FORM_URLENCODED = 'application/x-www-form-urlencoded;charset=UTF-8',
  // form-data  upload
  FORM_DATA = 'multipart/form-data;charset=UTF-8'
}
